<%@ page pageEncoding="utf-8" session="false" contentType="text/html; charset=utf-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>${archive.title}</title>
<meta name="keywords" content="test"/>
<meta name="description" content="test"/>
<meta name="robots" content="all"/>
<meta name="googlebot" content="all"/>
<meta name="baiduspider" content="all"/>
<meta name="copyright" content="All Rights Reserved 版权所有"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<link rel="stylesheet" type="text/css" href="${contextPath}/resource/note/css/base.css"/>
<link rel="stylesheet" type="text/css" href="${contextPath}/resource/note/theme/${archive.theme}"/>
<link rel="stylesheet" type="text/css" href="${contextPath}/resource/highlight/styles/note.css"/>
<script type="text/javascript" src="${contextPath}/resource/user/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="${contextPath}/resource/user/user.js"></script>
<script type="text/javascript" src="${contextPath}/resource/note/note.js"></script>
<script type="text/javascript" src="${contextPath}/resource/note/images.js"></script>
<script type="text/javascript" src="${contextPath}/resource/md/marked.min.js"></script>
<script type="text/javascript" src="${contextPath}/resource/highlight/highlight.pack.js"></script>
</head>
<body>
<div class="wiki-ctrl-menu">
    <div class="wrap" style="text-align: right;">
        <div class="wiki-ctrl">
            <div class="wiki-btn">
                <a class="wiki-open" href="${contextPath}/note/archive/display.html?archiveId=${archive.archiveId}" target="_blank">新窗口</a>
            </div>
            <div class="wiki-btn">
                <span class="edit">编辑</span>
                <span class="more"></span>
                <div class="menu">
                    <ul id="wiki-edit-menu">
                        <li archiveId="${archive.archiveId}" mimeType="text/html">编辑HTML</li>
                        <li archiveId="${archive.archiveId}" mimeType="text/mark">编辑MARK</li>
                        <li archiveId="${archive.archiveId}" mimeType="text/plain">编辑TEXT</li>
                    </ul>
                </div>
            </div>
            <div id="favorite-btn" class="wiki-btn" href="javascript:void(0)" favorite="${favorite}">收藏</div>
        </div>
    </div>
</div>
<div class="wrap">
    <div class="wiki-panel">
        <h1 style="margin-bottom: 10px; border-bottom: 1px solid #dddddd;" mimeType="${archive.mimeType}">${archive.title}</h1>
<!-- archive content start -->
<c:choose>
    <c:when test="${archive.mimeType == 'text/html'}">
<!-- html -->
<div class="wiki-content">
<c:out value="${archiveContent.content}"/>
</div>
    </c:when>
    <c:when test="${archive.mimeType == 'text/mark'}">
<!-- marked -->
<div class="wiki-content">
    <textarea class="markdown" style="display: none;"><c:out value="${archiveContent.content}"/></textarea>
</div>
    </c:when>
    <c:otherwise>
<!-- plain -->
<div class="wiki-content"><pre style="min-height: 400px;">${archiveContent.content}</pre></div>
    </c:otherwise>
</c:choose>
<!-- archive content end -->
        <c:if test="${pageCount > 1}">
        <div name="scrollpage" class="scrollpage" theme="2" pageNum="${pageNum}" pageSize="1" count="${pageCount}" href="${contextPath}/note/archive/display.html?archiveId=${archive.archiveId}&pageNum=%s"></div>
        </c:if>
    </div>
</div>
<div class="scrolltop" onclick="window.scrollTo(0, 0)"></div>
<div id="pageContext" class="hide" contextPath="${contextPath}" owner="${owner}" userId="${userId}" archiveId="${archive.archiveId}" mimeType="${archive.mimeType}"></div>
</body>
</html>
